<script>
  import $ from 'dfish-widget'
  import Method from '../Method.vue'

  export default {
    mixins: [Method],
    data() {
      return {
        name: '$.confirm(text, [yes], [no], [cover])',
        remark: '弹出提示框。',
        attrs: [{
          name: 'text',
          remark: '显示文本',
          type: 'String',
        },{
          name: 'yes',
          remark: '点击确定时触发',
          type: 'Function',
        },{
          name: 'no',
          remark: '点击取消或关闭时触发',
          type: 'Function',
        },{
          name: 'cover',
          remark: '是否显示一个全屏的半透明蒙版',
          type: 'Boolean',
        }],
        examples: [{
          remark: '弹出对话框',
          code: `
            $.confirm('确认删除？', () => console.log('yes'), () => console.log('no'))
            `
        }]
      }
    }
  }
</script>
